﻿using ModelCoding.View;
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;

namespace ModelCoding.Helpers
{
    public static class DialogHelper
    {
        public static bool ShowDialog(string msg)
        {
           return  App.Current.Dispatcher.Invoke(() => {
                var succ = new MessageDialog(msg).ShowDialog();

                return succ.Value;
            });
        }
        public static bool ShowPreview(string msg)
        {
            return App.Current.Dispatcher.Invoke(() => {
                var succ = new PreviewDialog(msg).ShowDialog();

                return succ.Value;
            });
        }

        public static Window ShowLoading()
        {
            return App.Current.Dispatcher.Invoke(() => {
                var load = new LoadingDialog();
                load.Show();

                return load;
            });
          
        }
    }
}
